<?php

namespace App\Models\Admin\Conf;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * Class Setting
 * @package App\Models\Admin\Conf
 * @version August 1, 2017, 9:40 am UTC
 */
class Setting extends Model
{
    use SoftDeletes;

    public $table = 'settings';
    

    protected $dates = ['deleted_at'];


    public $fillable = [
        'setting_option_id',
        'value'
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'setting_option_id' => 'integer',
        'value' => 'string'
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     **/
    public function settingOption()
    {
        return $this->hasOne(\App\Models\Admin\Conf\SettingOption::class, 'id', 'setting_option_id');
    }
}
